package com.zc.web.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.zc.web.domain.AllStats;
import com.zc.web.domain.TodayPlan;
import com.zc.web.domain.TodayPlanItem;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 今日计划Mapper接口
 *
 * @author zc
 * @date 2025-09-30
 */
@Mapper
public interface TodayPlanMapper extends BaseMapper<TodayPlan>
{
    /**
     * 查询今日计划
     *
     * @param id 今日计划主键
     * @return 今日计划
     */
    public TodayPlan selectTodayPlanById(Long id);

    /**
     * 查询今日计划列表
     *
     * @param todayPlan 今日计划
     * @return 今日计划集合
     */
    public List<TodayPlan> selectTodayPlanList(TodayPlan todayPlan);

    /**
     * 新增今日计划
     *
     * @param todayPlan 今日计划
     * @return 结果
     */
    public int insertTodayPlan(TodayPlan todayPlan);

    /**
     * 修改今日计划
     *
     * @param todayPlan 今日计划
     * @return 结果
     */
    public int updateTodayPlan(TodayPlan todayPlan);

    /**
     * 删除今日计划
     *
     * @param id 今日计划主键
     * @return 结果
     */
    public int deleteTodayPlanById(Long id);

    /**
     * 批量删除今日计划
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTodayPlanByIds(Long[] ids);

        /**
         * 批量删除今日计划子项明细
         *
         * @param ids 需要删除的数据主键集合
         * @return 结果
         */
        public int deleteTodayPlanItemByGoalIds(Long[] ids);

        /**
         * 批量新增今日计划子项明细
         *
         * @param todayPlanItemList 今日计划子项明细列表
         * @return 结果
         */
        public int batchTodayPlanItem(List<TodayPlanItem> todayPlanItemList);


        /**
         * 通过今日计划主键删除今日计划子项明细信息
         *
         * @param id 今日计划ID
         * @return 结果
         */
        public int deleteTodayPlanItemByGoalId(Long id);

        /**
         * 查询今日计划子项明细列表
         *
         * @param todayPlanItem 今日计划子项明细
         * @return 今日计划子项明细集合
         */
        public List<TodayPlanItem> selectTodayPlanItemList(TodayPlanItem todayPlanItem);


    /**
     * 删除今日计划子项
     */
    int deleteTodayPlanItem(Long id);



    AllStats selectAllClockInStats(Long userId);
}